package com.daxue.eurekaclientuserservice.jarload.adaptor.manager;

import com.daxue.eurekaclientuserservice.jarload.adaptor.BaseManager;
import com.daxue.eurekaclientuserservice.jarload.adaptor.model.AdaptorResourceConfig;
import com.daxue.eurekaclientuserservice.jarload.adaptor.model.AdaptorResourceModel;
import com.daxue.eurekaclientuserservice.jarload.adaptor.model.AdaptorType;
import org.springframework.stereotype.Service;

/**
 * @author daxue0929
 * @date 2023/2/8
 */

@Service
public class AdaptorResourceManager implements BaseManager<AdaptorResourceModel> {


    @Override
    public AdaptorResourceModel create(AdaptorResourceModel model) {
        // 暂不实现
        return null;
    }

    @Override
    public AdaptorResourceModel getById(String id) {
        AdaptorResourceModel.builder()
            .id("ar-test")
            .name("测试资源")
            .adaptorType(AdaptorType.DEFAULT)
            .createdOn(System.currentTimeMillis())
            .modifiedOn(System.currentTimeMillis())
            .resourceConfig(
                AdaptorResourceConfig.builder()
                    .resourceType("com.daxue.eurekaclientuserservice.jarload.HelloTest")
                    .build()
            ).build();
        return null;
    }
}
